Replication Materials for �Are Local Policy Attitudes Distinct?�
Jesse H. Rhodes, Brian F. Schaffner, and Raymond J. La Raja

This file contains a description of the materials included in this replication folder. 

1. Table of Contents

The replication folder includes both data files and Stata program (.do) files necessary to reproduce the results in the article. There is also an R script for performing one part of the analysis that was not easily produced by Stata. 

A. Program files:

i. code_lucid_psrm.do � This file replicates all of the analyses in the paper for study 1 with the exception of the second column of correlations in Table 1.  

ii. table1_tableA6.R � This file produces the within-community correlations presented in Table 1 (second column of entries) as well as Table A6 of the Supplementary Information document. 

iii. code_ces_psrm.do �  This file replicates all of the analyses in the paper for study 2.   

iv. tableA3.R �  This file replicates Table A3 of the Supplementary Information document.   


B. Datasets and codebooks:

i. lucid_data.csv � This is the dataset for Study 1. 

ii. lucid_codebook.pdf - This is a codebook for the survey data for study 1. 

iii. lucid_data.dta - This is a revised version of the dataset for study 1 which includes the IRT scales for use by table1_tableA6.R.

iv. CCES21_TUF_OUTPUT.dta � This is the dataset for Study 2, the survey conducted by YouGov, America as a module to the 2021 Cooperative Election Study. 

v. CCES21_TUF_OUTPUT_codebook.txt - This is a codebook for the survey data from study 2.

vi. zipcrosswalk.csv - This is a file that matches each zip code to the FIPS Census Place that is overlaps the most with. This data was obtained from https://mcdc.missouri.edu/applications/geocorr2022.html 

vii. factor_scores.xlsx - This is an excel file of factor scores from study 1 for use by tableA3.R. 

2. Code for Replicating Each Table/Figure

A. Main manuscript:

Figure 1: code_lucid_psrm.do
Figure 2: code_lucid_psrm.do
Figure 3: code_lucid_psrm.do
Figure 4: code_lucid_psrm.do
Figure 5: code_ces_psrm.do
Figure 6: code_ces_psrm.do
Table 1: code_lucid_psrm.do and table1_tableA6.R
Table 2: code_lucid_psrm.do

B. Supplementary Information

Figure A1: code_lucid_psrm.do
Figure A2: code_lucid_psrm.do
Figure A3: code_lucid_psrm.do
Figure A4: code_ces_psrm.do
Table A3: tableA3.R
Table A4: code_lucid_psrm.do
Table A5: code_lucid_psrm.do
Table A6: table1_tableA6.R and code_ces_psrm.do
Table A7: code_lucid_psrm.do

3. Base Software Dependencies

Most analyses were conducted in Stata 17.0 with exception of the within-community correlations in Table 1 and the graph for Figure 1, which were produced using R 4.2.1. 

4. Additional Dependencies

For code_lucid_psrm.do to fully run, the following packages will be installed:

"heatplot.ado"  
"colorcheck.ado"  
"colorpalette.ado"  
"colorpalette9.ado"  
"linepalette.ado"  
"symbolpalette.ado" 
"fapara.ado"

For table1_tableA6.R to fully run, the following packages will be installed:

dplyr
tidyr
psych
car






